#include "childwindow.h"
#include "ui_childwindow.h"

childWindow::childWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::childWindow)
{
    ui->setupUi(this);
    setWindowFlags(windowFlags()&~Qt::WindowMaximizeButtonHint);//禁止用户点击窗口最大化按钮
    resize(600,600);//设置窗口大小
}

childWindow::~childWindow()
{
    delete ui;
}

void childWindow::closeEvent(QCloseEvent *event)
{
    emit closed();
    QWidget::closeEvent(event);
}
void childWindow::paintEvent(QPaintEvent *event)
{
    QPainter painter(this);
    painter.drawPixmap(0,0,width(),height(),QPixmap(":/_2.jpg"));
}
